package com.automannn.springboot.practice;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;

/**
 * @author chenkh
 * @time 2021/9/28 16:30
 */
@SpringBootApplication
public class GenericApp {
    public static void main(String[] args) {
        ConfigurableApplicationContext applicationContext= SpringApplication.run(GenericApp.class);
        Object object= applicationContext.getBean("myBean");
        System.out.println(object);


    }

    @Bean
    public Object myBean(){
        return  new Object();
    }
}
